The start-up service under Mac has three main places to configure:
1, login items, account, System Preferences
2,/system/library/startupitems and/library/startupitems/
3,LAUNCHD system initialization Process configuration.
The first two optimizations are relatively simple, this paper mainly introduces the third more complex launchd configuration optimization.
Launchd is a critical process for initializing the system environment under Mac OS. Similar to Linux under the INIT, RC.
Let's start
the start-up service under Mac has three main places to configure:1, System Preferences-gt; account-gt; login Entry2,/system/library/startupitems and/library/startupitems/3,LAUNCHD system initialization Process configuration. The first two optimizations are relatively simple, this paper mainly introduces the third more complex launchd configuration optimization. Launchd is a critical process for initializing the system environment under Mac OS. Similar to Linux under the INIT, RC. Let's start by
First, the start-up service under the Mac main three configurable places1. Login item, account, System Preferences2,/system/library/startupitems and/library/startupitems/3, LAUNCHD system initialization process configuration.The first two optimizations are relatively simple, this paper mainly introduces the third more complex launchd configuration optimization.Launchd is a critical process for initializing the system environment under Mac OS. Similar to Linux under the INIT, RC.Second, Mac OS x
The installation of homebrew is outlined in the "Mac OS X Mavericks 10.9 Installation and configuration homebrew". We can use it here. Mac defaults to Apache, PHP, but these versions are older. And if you want to use the Nginx, the new version of PHP and MySQL, using homebrew to install is a good choice. And these software versions in the constant update, so some configuration is also changing, but according to homebrew in the installation process prompts always smooth installation of this confi
\--without-snmp \--without-apache \--with-fpm \--with-intl \-- With-homebrew-curl \--with-homebrew-libxslt \--with-homebrew-openssl \--with-imap \--with-mysql \--with-tidy
Since OSX has its own PHP environment, it is necessary to modify the system path and first run the brew installation version, ~/.bashrc adding:
Export path= "/usr/local/bin:/usr/local/sbin: $PATH"
If you want to install a new PHP extension, you can install it directly without recompiling PHP every time, all extensions can be
--with-debug --with-fpm --with-intl --with-homebrew-curl --with-homebrew-libxslt --with-homebrew-openssl --with-imap --with-mysql --with-tidySince OSX has its own PHP environment, it is necessary to modify the system path and first run the brew installation version, ~/.bashrc adding:export PATH="/usr/local/bin:/usr/local/sbin:$PATH"If you want to install a new PHP extension, you can install it directly without recompiling PHP every time, all extensions can bebrew search php56See, here is the ex
--with-homebrew-curl --with-homebrew-libxslt --with-homebrew-openssl --with-imap --with-mysql --with-tidySince OSX has its own PHP environment, it is necessary to modify the system path and first run the brew installation version, ~/.bashrc adding:export PATH="/usr/local/bin:/usr/local/sbin:$PATH"If you want to install a new PHP extension, you can install it directly without recompiling PHP every time, all extensions can bebrew search php56See, here is the extension I need to support the Phalco
/php55/5.5.15/lib/ PHP pear Config-set php_ini/usr/local/etc/php/5.5/php.ini✩✩✩✩extensions✩✩✩✩if You are have issues with custom
Extension compiling, ensure that you are using the brew version, by Placing/usr/local/bin Before/usr/sbin in your PATH: Path= "/usr/local/bin: $PATH" PHP55 Extensions'll always be compiled to against this PHP.
Please install them the using--without-homebrew-php to enable compiling against system PHP. ✩✩✩✩php cli✩✩✩✩if you are wish to swap the PHP with the comm
port 80, modify "/usr/local/etc/nginx. the value of the listener port under conf.
The default file access directory (root) is "/usr/local/Cellar/nginx/1.4.2/html" (here 1.4.2 is the installed nginx version, the folder name is based on the installed nginx version ).
2.3 set nginx to start running at startup:
The code is as follows:
Mkdir-p ~ /Library/LaunchAgents/
Cp/usr/local/Cellar/nginx/1.4.2/homebrew. mxcl. nginx. plist ~ /Library/
: /usr/local/etc/php/5.5/php.ini ✩✩✩✩ PEAR ✩✩✩✩ If PEAR complains about permissions, 'fix' the default PEAR permissions and config: chmod -R ug+w /usr/local/Cellar/php55/5.5.15/lib/php pear config-set php_ini /usr/local/etc/php/5.5/php.ini ✩✩✩✩ Extensions ✩✩✩✩ If you are having issues with custom extension compiling, ensure thatyou are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH: PATH="/usr/local/bin:$PATH" PHP55 Extensions will always be compiled agains
/local/etc/nginx. the value of the listener port under conf.
The default file access directory (root) is "/usr/local/Cellar/nginx/1.4.2/html" (here 1.4.2 is the installed nginx version, the folder name is based on the installed nginx version ).
2.3 set nginx to start running at startup:Mkdir-p ~ /Library/LaunchAgents/Cp/usr/local/Cellar/nginx/1.4.2/homebrew. mxcl. nginx. plist ~ /Library/LaunchAgents/Launch
is the version of the installed Nginx and the folder name is based on the installed Nginx version).
2.3, the Nginx set to boot operation:Mkdir-p ~/library/launchagents/Cp/usr/local/cellar/nginx/1.4.2/homebrew.mxcl.nginx.plist ~/library/launchagents/Launchctl load-w ~/library/launchagents/homebrew.mxcl.nginx.plist
But try it, not the superuser login, but the no
access directory (root) is "/usr/local/Cellar/nginx/1.4.2/html" (here 1.4.2 is the installed nginx version, the folder name is based on the installed nginx version ).2.3 set nginx to start running at startup:Copy codeThe Code is as follows:Mkdir-p ~ /Library/LaunchAgents/Cp/usr/local/Cellar/nginx/1.4.2/homebrew. mxcl. nginx. plist ~ /Library/LaunchAgents/Launchctl load-w ~ /Library/
/php55/5.5.15/lib/php pear config-set php_ini /usr/local/etc/php/5.5/php.ini ✩✩✩✩ Extensions ✩✩✩✩ If you are having issues with custom extension compiling, ensure thatyou are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH: PATH="/usr/local/bin:$PATH" PHP55 Extensions will always be compiled against this PHP. Please install themusing --without-homebrew-php to enable compiling against system PHP. ✩✩✩✩ PHP CLI ✩✩✩✩ If you wish to swap the PHP you use on the comm
| restart | stop | exit nginx
Nginx-s reload | reopen | stop | quit
After nginx is enabled, the default access port is 8080. to change to the commonly used port 80, modify "/usr/local/etc/nginx. the value of the listener port under conf.
The default file access directory (root) is "/usr/local/Cellar/nginx/1.4.2/html" (here 1.4.2 is the installed nginx version, the folder name is based on the installed nginx version ).
2.3 set nginx to start running at startup:
The code is as follows:
Mkdir-p
/local/etc/ph P/5.5/php.ini✩✩✩✩extensions✩✩✩✩if you have issues with custom extension compiling, ensure thatyou is using the Brew version, by Placing/usr/local/bin Before/usr/sbin in your path:path= "/usr/local/bin: $PATH" PHP55 Extensions wil L always am compiled against this PHP. Install themusing--without-homebrew-php to enable compiling against system PHP. ✩✩✩✩php Cli✩✩✩✩if you wish-to-swap the PHP you have the command line and you should add the following to ~/.bashrc,~/.zs HRC, ~/.profile
/local/cellar/php55/5.5.15/lib/php pear config-set php_ini/usr/local/etc/ph P/5.5/php.ini✩✩✩✩extensions✩✩✩✩if you have issues with custom extension compiling, ensure thatyou is using the Brew version, by Placing/usr/local/bin Before/usr/sbin in your path:path= "/usr/local/bin: $PATH" PHP55 Extensions wil L always am compiled against this PHP. Install themusing--without-homebrew-php to enable compiling against system PHP. ✩✩✩✩php Cli✩✩✩✩if you wish-to-swap the PHP you have the command line and yo
Find the path to PHP-FPM
Whereis PHP-FPM
If you cannot find it, you can try using:
Find/-name PHP-FPMThe general default path is:
/usr/sbin/php-fpm
modifying php-fpm.conf configuration Files
The default location is:
/private/etc/php-fpm.conf
If it doesn't exist, see if it exists.
/private/etc/php-fpm.conf.default
Then copy a copy:
sudo cp/private/etc/php-fpm.conf.default/private/etc/php-fpm.conf
Modify the PHP-FPM configuration file's project "Daemonize"
Daemonize = yes
Remove the semicolon f
1. Removal of LIGHTTPDWhen installing LIGHTTPD on Mac OS X, I used launchctl to automate the lighttpd startup. Now, you just need to unload. Launchctl Unload ~/library/launchagents/homebrew.mxcl.lighttpd.plist This will immediately stop the LIGHTTPD from running. Next, remove the homebrew.mxcl.lighttpd.plist from the ~/library/lanuchagents directory. Otherwise, the next time you start the system, LIGHTTPD will start again. 2. Configuring the Openres
/homebrew.mxcl.nginx.plist ~/library/launchagents/Launchctl load-w ~/library/launchagents/homebrew.mxcl.nginx.plistTo set permissions:sudo chown Root:wheel/usr/local/cellar/nginx/1.4.7/bin/nginxsudo chmod u+s/usr/local/cellar/nginx/1.4.7/bin/nginxOK, here we have successfully installed the Nginx and set the boot up.
3, install MySQL
Brew Install MySQLTo configure the MySQL database:mysql_install_db--verbo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.